package com.liqiye.paymanager.bean.common;

import lombok.Data;

import java.math.BigDecimal;

/**
 * 货币汇率转换 https://api.exchangerate.host/convert?access_key=XXX&from=USD&to=CNY&amount=100 的返回结果
 */
@Data
public class ExchangerateResponse {

    private boolean success;
    private Query query;
    private Info info;
    private String date;
    private BigDecimal result;

    @Data
    public static class Query {
        private String from;
        private String to;
        private BigDecimal amount;
    }

    @Data
    public static class Info {
        private BigDecimal rate;
    }

}
